6f0b2155db24ba69f7f8a3e89894b43ddbb6873d,components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java,CxfProducer,createClientFromClientFactoryBean,#ClientFactoryBean#,108

Before Change



    // If cfb is null, we will try to find the right cfb to use.
    private Client createClientFromClientFactoryBean(ClientFactoryBean cfb) throws CamelException {
        Bus bus = BusFactory.getDefaultBus();
        if (endpoint.isSpringContextEndpoint()) {
            CxfEndpointBean cxfEndpointBean = endpoint.getCxfEndpointBean();
            if (cfb == null) {

After Change


    // If cfb is null, we will try to find the right cfb to use.
    private Client createClientFromClientFactoryBean(ClientFactoryBean cfb) throws CamelException {
        Bus bus = null;
        if (endpoint.getApplicationContext() != null) {
            SpringBusFactory bf = new SpringBusFactory(endpoint.getApplicationContext());
            bus = bf.createBus();
        } else {
            // now we just use the default bus here
            bus = BusFactory.getDefaultBus();
        }
        if (endpoint.isSpringContextEndpoint()) {
            CxfEndpointBean cxfEndpointBean = endpoint.getCxfEndpointBean();